package org.dreamwork.base.sh;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;

/**
 * Created by IntelliJ IDEA.
 * User: seth
 * Date: 2009-8-21
 * Time: 11:47:46
 */
public class ServiceFactory implements BeanFactoryAware {
    private static BeanFactory fac;

    public void setBeanFactory (BeanFactory beanFactory) throws BeansException {
        fac = beanFactory;
    }

    public static Object getBean (String name) {
        return fac.getBean (name);
    }
}